using System;
using Microsoft.Practices.ServiceLocation;

namespace Caramel.IO
{
	public static class FileSystem
	{
		public static Func<IFileSystem> GetCurrent = () => { try { return ServiceLocator.Current.GetInstance<IFileSystem>(); } catch { return new WindowsFileSystem(); } };

		public static IFile File { get { return GetCurrent().File;  } }

		public static IDirectory Directory { get { return GetCurrent().Directory; } }
	}
}
